/* eslint-disable */
/**
 * Created by GYL on 2018/8/24
 */
import React, { Component } from 'react';
import styles from '../EventPosting.less';
import { Collapse, Tabs, Select, Input, Tooltip, Form, Row, Col, TreeSelect, Tag, message } from 'antd';
import PublicService from "../../../services/PublicService";
import config from '../../../config';
import Util from '../../../utils/Util';
import request from '../../../utils/request';
import MyTable from "../../../components/common/MyTable";
import MyModal from '../../../components/common/MyModal';
import Tab1 from './tab/Tab1';
import Tab2 from './tab/Tab2';
import Tab3 from './tab/Tab3';
import Tab4 from './tab/Tab4';
import Tab5 from './tab/Tab5';
const TabPane = Tabs.TabPane;
const { Panel } = Collapse;
const { Option } = Select;
const { TextArea } = Input;
const FormItem = Form.Item;
const { SHOW_CHILD } = TreeSelect;

class Edit extends Component {

    constructor(props) {
        super(props)

    }

    componentDidMount() {

    }

    state = {


    };


    // 取消保存
    ModalCancel = (type) => {
        let t = this;
        t.setState({
            [type]: false,
            modalBtnLoading: false
        })
        this.props.ModalCancel()
    };




    render() {
        let t = this
        let width = document.body.clientWidth;
        const height = document.body.clientHeight;
        let containerHeight = '76vh';
        let tableHeight = 310;
        if (width > 1367) {
            tableHeight = 380;
            containerHeight = '83vh';
        }

        const genExtra = () => (

            <span onClick={this.onDelete} style={{ color: 'red' }}>删除</span>
        );



        return (

            <MyModal
                mask={false}
                width={800}
                visible={true}
                title={this.props.title}
                footerShow={false}
                destroyOnClose={true}
                {...this.props}
            >
                <Tabs defaultActiveKey="1" size="small">
                    <TabPane tab="基本信息" key="1">

                        <Tab1
                            id={this.props.id}
                        />
                    </TabPane>
                    {/* <TabPane tab="安全信息" key="2">
                        <Tab2
                            id={this.props.id}
                        />

                    </TabPane> */}
                    <TabPane tab="风险信息" key="3">
                        <Tab3
                            id={this.props.id}
                        />

                    </TabPane>
                    <TabPane tab="知识库" key="4">
                        <Tab4
                            id={this.props.id}
                        />

                    </TabPane>
                    <TabPane tab="子事件" key="5">
                        <Tab5
                            id={this.props.id}
                        />

                    </TabPane>

                </Tabs>
            </MyModal>
        );


    }
}
export default Form.create()(Edit);

